/*******************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.        */
/*                                                                 */
/*  NAME      = ldap_comm.h                                        */
/*  NOTE      =                                                    */
/*  DATE      = 2015/07/27 by geyh                                 */
/*******************************************************************/
#include"ldap_base_data.h"

#ifndef __LDAP_COMM_H_
#define __LDAP_COMM_H_

int ldap_get_lenth(Frbyte_Packet *p_packet, unsigned int *p_ui_length);
int ldap_get_protocol(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, int *p_c_protocolOp);
int ldap_get_resultCode(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_get_resp_info(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data);
int ldap_get_scope(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_get_derefAliases(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data);
int ldap_get_filter(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data);
int ldap_get_string(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, const char *p_field_name);
int ldap_get_string1(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, const char *p_field_name);
//int ldap_get_int(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, const char *p_field_name);
//int ldap_get_int1(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, const char *p_field_name);
int ldap_get_boolean(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, const char *p_field_name);
//int ldap_get_authentication(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data);
//int ldap_get_password(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data);
int ldap_get_message_id(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, int *p_i_mess_id, int i_use_request);
int ldap_get_attibutes(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data,int i_use_request, L7session_ldap_private *p_st_private);
int ldap_get_attibutes1(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data);
int ldap_get_response(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_add_request(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_bind_request(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_del_request(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_modDN_request(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_search_request(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_search_entry(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data);
int ldap_abandon_request(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_get_mod_operation(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data);
int ldap_get_modification(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data);
int ldap_modify_request(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);
int ldap_search_res_entry(Frbyte_Packet *p_packet, Frreport_body_data *p_st_body_data, L7session_ldap_private *p_st_private);

#endif
